import React, { useState } from 'react'

export default function OptionsBtn(props) {
    const [currt, setCurrt] = useState(1)
    return (
        <div className='OptionsBtn'>
            {props.data.map(item => {
                return (
                    <div key={item.id} className={currt === item.id ? "active" : ''} onClick={() => setCurrt(item.id)}>{item.name}</div>
                )
            })}
        </div>
    )
}
